<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:body>
	<ui:composition template="/controlling/indexTemplate.xhtml">
		<ui:define name="title">Index</ui:define>
		<ui:define name="content">
			<h:form>
				<p:panel>
					<h:panelGrid columns="4" cellpadding="10">

						<h:panelGrid columns="1"
							rendered="#{registeredUser.hasCategoryPrivilege(1)}">
							<h:commandLink action="#{indexBean.toAdministrationIndex}"
								rendered="#{registeredUser.hasCategoryPrivilege(1)}">
								<p:graphicImage width="100" height="100"
									value="/resources/images/admin-min.png" style="border:0px;" />
							</h:commandLink>
							<h:commandLink value="Administration"
								action="#{indexBean.toAdministrationIndex}"
								style="text-decoration: none;" />
						</h:panelGrid>
						<h:panelGrid columns="1"
							rendered="#{registeredUser.hasCategoryPrivilege(2)}">
							<h:commandLink action="#{indexBean.toAqaratIndex}"
								rendered="#{registeredUser.hasCategoryPrivilege(2)}">
								<p:graphicImage width="100" height="100"
									value="/resources/images/aqarat.png" style="border:0px;" />
							</h:commandLink>
							<h:commandLink value="Aqarat"
								action="#{indexBean.toAqaratIndex}"
								style="text-decoration: none;" />
						</h:panelGrid>
						<h:panelGrid columns="1">
							<h:commandLink action="#{indexBean.toUserInformation}">
								<p:graphicImage width="100" height="100" value="/resources/images/user.png"
									style="border:0px;" />
							</h:commandLink>
							<h:commandLink value="My Information"
								action="#{indexBean.toUserInformation}"
								style="text-decoration: none;" />
						</h:panelGrid>

						<h:panelGrid columns="1">
							<h:commandLink action="#{indexBean.toThemeIndex}">
								<p:graphicImage width="100" height="100"
									value="/resources/images/themes.png" style="border:0px;" />
							</h:commandLink>
							<h:commandLink value="Change Theme"
								action="#{indexBean.toThemeIndex}"
								style="text-decoration: none;" />
						</h:panelGrid>

						<h:panelGrid columns="1">
							<h:commandLink action="#{logoutBean.logout}">
								<p:graphicImage width="100" height="100"
									value="/resources/images/logout.png" style="border:0px;" />
							</h:commandLink>
							<h:commandLink value="Log out" action="#{logoutBean.logout}"
								style="text-decoration: none;" />
						</h:panelGrid>

					</h:panelGrid>
				</p:panel>
			</h:form>
			<p:spacer height="50" />

		</ui:define>
	</ui:composition>
</h:body>
</html>

